import Layout from "@/layout";

// 静态路由/常量路由
export const staticRoutes = [
  {
    path: "/login",
    component: () => import("@/views/login/index"),
    hidden: true,
  },

  {
    path: "/404",
    component: () => import("@/views/404"),
    hidden: true,
  },

  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    children: [
      {
        path: "dashboard",
        name: "首页",
        component: () => import("@/views/dashboard/index"),
        meta: { title: "首页", icon: "dashboard" },
      },
    ],
  },
];

// 异步路由/动态路由
export const asyncRoutes = [
  {
    path: "/acl",
    name: "Acl",
    component: () => import("@/layout/index.vue"),
    redirect: "/acl/user/list",
    meta: { title: "权限管理", icon: "el-icon-setting" },
    children: [
      {
        path: "acl/user/list",
        name: "User",
        component: () => import("@/views/acl/user/index.vue"),
        meta: {
          title: "用户管理",
        },
      },
      {
        path: "acl/role/list",
        name: "Role",
        component: () => import("@/views/acl/role/index.vue"),
        meta: {
          title: "角色管理",
        },
      },
      {
        path: "/acl/role/auth",
        name: "RoleAuth",
        component: () => import("@/views/acl/role/roleAuth.vue"),
        meta: {
          title: "角色管理",
          activeMenu: "/acl/role/list",
        },
        hidden: true,
      },
      {
        path: "acl/permission/list",
        name: "Permission",
        component: () => import("@/views/acl/role/index.vue"),
        meta: {
          title: "菜单管理",
        },
      },
    ],
  },
  {
    path: "/siji",
    component: () => import("@/layout/index.vue"),
    name: "Siji",
    meta: {
      title: "四季",
      icon: "ele-Sunny",
    },
    children: [
      {
        path: "summer/list",
        component: () => import("@/views/siji/summer/index.vue"),
        name: "Summer",
        meta: {
          title: "夏天",
        },
      },
      {
        path: "winter/list",
        component: () => import("@/views/siji/winter/index.vue"),
        name: "Winter",
        meta: {
          title: "冬天",
        },
      },
    ],
  },
];

// 任意路由
export const anyRoute =
  //任意路由
  { path: "*", redirect: "/404", hidden: true };
